<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:uelk="http://www.universal-devices.com/wsdk/isy/elk/1.0/objects" xmlns:uinsteon="http://www.universal-devices.com/wsdk/isy/3.0/objects/insteon" xmlns:uupb="http://www.universal-devices.com/wsdk/isy/3.0/objects/upb" xmlns:ue="http://www.universal-devices.com/wsdk/isy/3.0/events" elementFormDefault="unqualified" targetNamespace="http://www.universal-devices.com/wsdk/isy/3.0/events" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:import schemaLocation="./upb.xsd" namespace="http://www.universal-devices.com/wsdk/isy/3.0/objects/upb" />
  <xsd:import schemaLocation="./insteon.xsd" namespace="http://www.universal-devices.com/wsdk/isy/3.0/objects/insteon" />
  <xsd:import schemaLocation="./elkobjs.xsd" namespace="http://www.universal-devices.com/wsdk/isy/elk/1.0/objects" />
  <xsd:simpleType name="EventControls">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="_0" />
      <xsd:enumeration value="_1" />
      <xsd:enumeration value="_2" />
      <xsd:enumeration value="_3" />
      <xsd:enumeration value="_4" />
      <xsd:enumeration value="_5" />
      <xsd:enumeration value="_6" />
      <xsd:enumeration value="_7" />
      <xsd:enumeration value="_8" />
      <xsd:enumeration value="_9" />
      <xsd:enumeration value="_10" />
      <xsd:enumeration value="_11" />
      <xsd:enumeration value="_12" />
      <xsd:enumeration value="_13" />
      <xsd:enumeration value="_14" />
      <xsd:enumeration value="_15" />
      <xsd:enumeration value="_16" />
      <xsd:enumeration value="_17" />
      <xsd:enumeration value="_18" />
      <xsd:enumeration value="_19">
        <xsd:annotation>
          <xsd:documentation>
						Actions and Event Info is defined in elkobjs.xsd	
					</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="_20">
        <xsd:annotation>
          <xsd:documentation>
						Device Linker Events.
						EventInfo defined in DeviceLinkerEventInfo
					</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="EventTypes">
    <xsd:union memberTypes="ue:EventControls uupb:UPBControlTypes uinsteon:INSTEONControlTypes" />
  </xsd:simpleType>
  <xsd:simpleType name="HeartbeatAction">
    <xsd:annotation>
      <xsd:documentation>
				Shall contain the max age in seconds before the next heartbeat is sent
			</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string" />
  </xsd:simpleType>
  <xsd:simpleType name="ControlAction">
    <xsd:annotation>
      <xsd:documentation>
				Shall contain the specific value per each Control Type
			</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string" />
  </xsd:simpleType>
  <xsd:simpleType name="TriggerAction">
    <xsd:annotation>
      <xsd:documentation>
				Shall contain specific actions relating to Triggers
			</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="1" />
      <xsd:enumeration value="2" />
      <xsd:enumeration value="3" />
      <xsd:enumeration value="4" />
      <xsd:enumeration value="5" />
      <xsd:enumeration value="6" />
      <xsd:enumeration value="7" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="ProtocolSpecificAction">
    <xsd:annotation>
      <xsd:documentation>
				Very much dependent on the underlying protocol (INSTEON, ZWave, etc.)
			</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string" />
  </xsd:simpleType>
  <xsd:simpleType name="NodeUpdatedAction">
    <xsd:annotation>
      <xsd:documentation>
				Shall contain the possible Actions for when nodes are updated
			</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="NN" />
      <xsd:enumeration value="NR" />
      <xsd:enumeration value="ND" />
      <xsd:enumeration value="NE" />
      <xsd:enumeration value="CE" />
      <xsd:enumeration value="MV" />
      <xsd:enumeration value="EN" />
      <xsd:enumeration value="PC" />
      <xsd:enumeration value="GN" />
      <xsd:enumeration value="GR" />
      <xsd:enumeration value="GD" />
      <xsd:enumeration value="FD" />
      <xsd:enumeration value="FN" />
      <xsd:enumeration value="FR" />
      <xsd:enumeration value="MV" />
      <xsd:enumeration value="RG" />
      <xsd:enumeration value="CL" />
      <xsd:enumeration value="SN" />
      <xsd:enumeration value="SC" />
      <xsd:enumeration value="PI" />
      <xsd:enumeration value="WR" />
      <xsd:enumeration value="WH" />
      <xsd:enumeration value="WD" />
      <xsd:enumeration value="CL" />
      <xsd:enumeration value="DI" />
      <xsd:enumeration value="DP" />
      <xsd:enumeration value="RV" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="SystemConfigAction">
    <xsd:annotation>
      <xsd:documentation>
				Shall contain the possible Actions when system configuration is updated
			</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="1" />
      <xsd:enumeration value="2" />
      <xsd:enumeration value="3" />
      <xsd:enumeration value="4" />
      <xsd:enumeration value="5" />
      <xsd:enumeration value="6" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="SystemStatusAction">
    <xsd:annotation>
      <xsd:documentation>
				Shall contain System Status
			</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="0" />
      <xsd:enumeration value="1" />
      <xsd:enumeration value="2" />
      <xsd:enumeration value="3" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="InternetAccessAction">
    <xsd:annotation>
      <xsd:documentation>
				Shall contain information about the state of Internet Access
			</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="0" />
      <xsd:enumeration value="1" />
      <xsd:enumeration value="2" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="SystemProgressAction">
    <xsd:annotation>
      <xsd:documentation>
				Shall contain system progress information
			</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="1" />
      <xsd:enumeration value="2.1" />
      <xsd:enumeration value="2.2" />
      <xsd:enumeration value="2.3" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="SecuritySystemAction">
    <xsd:annotation>
      <xsd:documentation>
				Shall contain information the state of the security system
			</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="0" />
      <xsd:enumeration value="1" />
      <xsd:enumeration value="DA" />
      <xsd:enumeration value="AW" />
      <xsd:enumeration value="AS" />
      <xsd:enumeration value="ASI" />
      <xsd:enumeration value="AN" />
      <xsd:enumeration value="ANI" />
      <xsd:enumeration value="AV" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="SystemAlertAction">
    <xsd:annotation>
      <xsd:documentation>
				A programmable alert sent to clients to do as they wish:
				i.e. beep, change colors, do something else, etc.
				The EventInfo holds:
					bPrice = base price
					cPrice = current price
			</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="1" />
      <xsd:enumeration value="2" />
      <xsd:enumeration value="3" />
      <xsd:enumeration value="4" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="ElectricityAction">
    <xsd:annotation>
      <xsd:documentation>
				Open Auto Demand/Response Actions.
				The EventInfo structure holds:
					bPrice = base price
					cPrice = current price
			</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="1" />
      <xsd:enumeration value="2" />
      <xsd:enumeration value="4">
        <xsd:annotation>
          <xsd:documentation>
						Electricity meter information.
						The EventInfo structure holds:
							total	= total utilization in watts
							watts	= instantaneous utilization in watts
							voltage	= instantaneous voltage in Volts
							current	= instantaneous current in Amps
					</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="5" />
      <xsd:enumeration value="6">
        <xsd:annotation>
          <xsd:documentation>
						active = the actual status of FYP
					</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="ClimateAction">
    <xsd:annotation>
      <xsd:documentation>
				Climate Information
				The EventInfo structure holds:
					value	= the value, usually, in double
					unit	= the unit of measure for the value
			</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="1" />
      <xsd:enumeration value="2" />
      <xsd:enumeration value="3" />
      <xsd:enumeration value="4" />
      <xsd:enumeration value="5" />
      <xsd:enumeration value="6" />
      <xsd:enumeration value="7" />
      <xsd:enumeration value="8" />
      <xsd:enumeration value="9" />
      <xsd:enumeration value="10" />
      <xsd:enumeration value="11" />
      <xsd:enumeration value="12" />
      <xsd:enumeration value="13" />
      <xsd:enumeration value="14" />
      <xsd:enumeration value="15" />
      <xsd:enumeration value="16" />
      <xsd:enumeration value="17" />
      <xsd:enumeration value="18" />
      <xsd:enumeration value="19" />
      <xsd:enumeration value="20" />
      <xsd:enumeration value="21" />
      <xsd:enumeration value="22" />
      <xsd:enumeration value="23" />
      <xsd:enumeration value="24" />
      <xsd:enumeration value="25" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="ElectricityMonitorAction">
    <xsd:annotation>
      <xsd:documentation>
				Electricity Monitor Actions.
				The EventInfo structure holds:
					channel = channel number
					value = data type and value
			</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="1">
        <xsd:annotation>
          <xsd:documentation>
						EventInfo holds the number of data channels currently being
						reported on by the monitor.
					</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="2">
        <xsd:annotation>
          <xsd:documentation>
						EventInfo holds the channel number followed by the energy utilization
						for the most recent peroid measured. This is reported in watts.
					</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="7">
        <xsd:annotation>
          <xsd:documentation>
					Raw data coming from a monitoring device
					</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="UPBLinkerAction">
    <xsd:annotation>
      <xsd:documentation>
				Events relating to UPB Linker
			</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="1" />
      <xsd:enumeration value="2" />
      <xsd:enumeration value="3" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="UPBDeviceAdderAction">
    <xsd:annotation>
      <xsd:documentation>
				Events relating to UPB Linker
			</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="1" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="ZigbeeAction">
    <xsd:annotation>
      <xsd:documentation>
				Events relating to Zigbee Driver
			</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="1" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="DeviceLinkerAction">
    <xsd:annotation>
      <xsd:documentation>
				Shall contain the possible Actions generated during/after device linking operations 
			</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="1" />
      <xsd:enumeration value="2" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="EventActionTypes">
    <xsd:union memberTypes="ue:ControlAction ue:HeartbeatAction ue:TriggerAction ue:ProtocolSpecificAction ue:NodeUpdatedAction ue:SystemConfigAction ue:SystemStatusAction ue:InternetAccessAction ue:SystemProgressAction ue:SecuritySystemAction ue:SystemAlertAction ue:ElectricityAction ue:ClimateAction ue:ElectricityMonitorAction ue:UPBLinkerAction ue:UPBDeviceAdderAction ue:ZigbeeAction uelk:ELKAction ue:DeviceLinkerAction" />
  </xsd:simpleType>
  <xsd:complexType name="Event">
    <xsd:sequence>
      <xsd:annotation>
        <xsd:documentation>
					An XML structure with specific information for each event type
				</xsd:documentation>
      </xsd:annotation>
      <xsd:element name="control" type="ue:EventTypes" />
      <xsd:element name="action" type="ue:EventActionTypes" />
      <xsd:element name="node" type="xsd:string" />
      <xsd:element name="eventInfo" type="xsd:string" />
    </xsd:sequence>
    <xsd:attribute name="seqnum" type="xsd:double" use="required">
      <xsd:annotation>
        <xsd:documentation>
					Unique message sequence number incremented with each message for this subscription
				</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="sid" type="xsd:string" use="required">
      <xsd:annotation>
        <xsd:documentation>Subscription ID</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
  </xsd:complexType>
  <xsd:simpleType name="DeviceLinkerState">
    <xsd:annotation>
      <xsd:documentation>
				State codes for device linking events
			</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="1" />
      <xsd:enumeration value="2" />
      <xsd:enumeration value="3" />
      <xsd:enumeration value="4" />
      <xsd:enumeration value="5" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="DeviceLinkerError">
    <xsd:annotation>
      <xsd:documentation>
				Status codes for device linking events
			</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="0" />
      <xsd:enumeration value="1" />
      <xsd:enumeration value="2" />
      <xsd:enumeration value="3" />
      <xsd:enumeration value="4" />
      <xsd:enumeration value="5" />
      <xsd:enumeration value="6" />
      <xsd:enumeration value="7" />
      <xsd:enumeration value="8" />
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:complexType name="DeviceLinkerEventInfo">
    <xsd:sequence>
      <xsd:annotation>
        <xsd:documentation>
					An XML structure with specific information for DeviceLinkerAction.Status
				</xsd:documentation>
      </xsd:annotation>
      <xsd:element minOccurs="1" maxOccurs="1" name="state" type="ue:DeviceLinkerState" />
      <xsd:element minOccurs="1" maxOccurs="1" name="err" type="ue:DeviceLinkerError" />
      <xsd:element minOccurs="1" maxOccurs="1" name="addr" type="xsd:string">
        <xsd:annotation>
          <xsd:documentation>
						The native address of the device 
					</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element minOccurs="1" maxOccurs="1" name="type" type="xsd:string">
        <xsd:annotation>
          <xsd:documentation>
						The type of the device (see family.xsd)
					</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element minOccurs="0" maxOccurs="1" name="name" type="xsd:string">
        <xsd:annotation>
          <xsd:documentation>
						The name given to the device, empty if no name
					</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
</xsd:schema>